package service.impl;

import javax.annotation.Resource;
import dao.WlCategoryMapper;
import pojo.WlCategory;
import service.WlCategoryService;
import java.util.List;
import dao.WlCommodityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service("wlCategoryService")
public class WlCategoryServiceimpl implements WlCategoryService{
    @Autowired
    @Resource(name="wlCategoryMapper")
    private WlCategoryMapper wlCategoryMapper;

    public WlCategoryMapper getWlCategoryMapper() {
        return wlCategoryMapper;
    }

    public void setWlCategoryMapper(WlCategoryMapper wlCategoryMapper) {
        this.wlCategoryMapper = wlCategoryMapper;
    }

    public List<WlCategory> getAll(int page) {
        return wlCategoryMapper.getAll(page);
    }

    public int getCount() {
        return wlCategoryMapper.getCount();
    }

//    public int addAir(WlCategory w) {
//        return wlCategoryMapper.addAir(w);
//    }
//
    public void del(String id) {
        wlCategoryMapper.del(id);
   }

    public int upd(WlCategory w) {
        return wlCategoryMapper.upd(w);
    }

    public WlCategory getoneById(String cateid) {
        return wlCategoryMapper.getoneById(cateid);
    }
//
//    public void upd(WlCategory w) {
//        wlCategoryMapper.upd(w);
//    }
//
//    public WlCategory findOne(int id) {
//        return wlCategoryMapper.findOne(id);
//    }

    public String getPname(String pid) {
        return wlCategoryMapper.getPname(pid);
    }
}
